package com.example.demo.位;
/**
 * @author haijianxia pure_xhj@163.com
 * @Date 2021-11-17
 * @Time 17:24
 */
public class AA {
  public static void main(String[] args) {
    long l = rotateLeft(1L, 1);
    System.out.println("====================================================");

    long l1 = 1L << 1;//2
    long l4 = 1L >> 1;//0
    long l2 = 7L >>> 1;//0
    long l3 = 7L >>> -2;//2
System.out.println("====================================================");
  }

  public static long rotateLeft(long i, int distance) {
    return (i << distance) | (i >>> -distance);//   10   10   10
  }
}
